package com.jeejio.train.dao;

import com.jeejio.train.entity.Course;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface CourseMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Course record);

    int insertSelective(Course record);

    Course selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Course record);

    int updateByPrimaryKey(Course record);

    List<Course> selectByDeliveryDate(@Param("deliveryDate") Date deliveryDate
            , @Param("draft") byte draft);

    int deleteLecturerCourseByID(@Param("courseID") Integer courseID
            , @Param("lecturerID") Integer lecturerID);

    List<Date> findHasCourseDates(@Param("between") Date between
            , @Param("and") Date and);

    List<Course> selectBeforeDate(@Param("beforeDate") Date beforeDate);
}